// AUSlotsGutsIconNames.H : Declaration of the CAUSlotsGutsIconNames class

#ifndef __AUSLOTSGUTSICONNAMES_H_
#define __AUSLOTSGUTSICONNAMES_H_

class CAUSlotsGutsIconNamesAccessor
{
public:
	LONG m_gutsid;
	BYTE m_iconid;
	TCHAR m_iconName[33];

BEGIN_COLUMN_MAP(CAUSlotsGutsIconNamesAccessor)
	COLUMN_ENTRY(1, m_iconid)
	COLUMN_ENTRY(2, m_iconName)
END_COLUMN_MAP()

BEGIN_PARAM_MAP(CAUSlotsGutsIconNamesAccessor)
	COLUMN_ENTRY(1, m_gutsid)
END_PARAM_MAP()

DEFINE_COMMAND_EX(CAUSlotsGutsIconNamesAccessor, L" \
	SELECT \
		iconid, \
		iconName  \
		FROM dbo.AUSlotsGutsIconNames \
		WHERE gutsid = ?")

	// You may wish to call this function if you are inserting a record and wish to
	// initialize all the fields, if you are not going to explicitly set all of them.
	void ClearRecord()
	{
		memset(this, 0, sizeof(*this));
	}
};

class CAUSlotsGutsIconNames : public CCommand<CAccessor<CAUSlotsGutsIconNamesAccessor> >
{
public:
	HRESULT Open( CSession* pSession )
	{
		return CCommand<CAccessor<CAUSlotsGutsIconNamesAccessor> >::Open(*pSession);
	}
};

#endif // __AUSLOTSGUTSICONNAMES_H_
